$Q=(\cos(-\theta), \sin(-\theta))$"), B);
> C := (xpart A, 0); label.lrt(textext("$A$"), C);
> label(textext("$O$"), origin);
> \stopbuffer
> \starttext
> I'd like use $\sin$ and $\cos$ in the metafun. But it shows strange text
instead
> of $\sin$ and $\c
origin);
\stopbuffer
\starttext
I'd like use $\sin$ and $\cos$ in the metafun. But it shows strange text
instead of $\sin$ and $\cos$.
\processMPbuffer[pointCircle]
\stoptext
> 2022. 4. 13. 오전 11:09, ntg-context-requ...@ntg.nl 작성:
>
> Send ntg-context mailing list submission
h (p)(2minStrokeWidth*sin(offsetPathLength*pi));
>> \stopbuffer
>> \typebuffer
>> ... and then how do I get the MP graphic?
> \processMPbuffer
“of course”
Thank you!
Used here: https://github.com/fiee/fiziko/blob/master/fiziko.mkiv
Hraban
___
;
p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
\stopbuffer
\typebuffer
... and then how do I get the MP graphic?
\processMPbuffer
ead. Although I
could emulate it in mkiv, it is currently an LMTX only feature.
The (optional) list accepts the usual {1,2,5,7-9} kind of specification.
Very interesting. What will be the syntax to use this with \processMPbuffer and
\startMPcode?
In order to avoid a slash I went for the 'stacking
ead. Although I
could emulate it in mkiv, it is currently an LMTX only feature.
The (optional) list accepts the usual {1,2,5,7-9} kind of specification.
Very interesting. What will be the syntax to use this with \processMPbuffer and
\startMPcode?
For now just use:
\setupMPvariables[list=4]
e
advantage is that one doesn't have to set up a graphic in
> order (read: save pictures, flush them later on) and it is actually a
> rather cheap extension in terms of runtime and overhead. Although I
> could emulate it in mkiv, it is currently an L
of animation using \processMPbuffer which I did
before. You can see it using adobe reader.
\startbuffer[UDBasic]
pair A,B,C,D;
pair E, F, G, H;
path p,q;
numeric ang,maxNum;
u:=1in;
A=(.95*TextWidth,u); B=(0,u); C=(0,0); D=(.95*TextWidth,0);
p := A--B--C--D;
q := (TextWidth,1.5u)--(0,1.5u)--(0
ge and the
> folding line which bisect the angle of the former folding line [M,N].
>
> H := whatever[N, N + dir(.5*angle(M-N))*u] = whatever[A,B];
>
> Enjoy the use of “whatever”!
>
> I made an animation of the folding process using animation module and
> \proce
is the intersection point of the edge and the
folding line which bisect the angle of the former folding line [M,N].
H := whatever[N, N + dir(.5*angle(M-N))*u] = whatever[A,B];
Enjoy the use of “whatever”!
I made an animation of the folding process using animation module and
\processMPbuffer.
But Woldgang’s
Hans
> >> using this expression, but I had always thought this is just a name…
> >>
> >> Best regards: Otared
> >>
> >>> On 21 Jun 2021, at 06:26, Aditya Mahajan wrote:
> >>>
> >>> On Mon, 21 Jun 2021, Jeong Dal wrote:
> >
;> On 21 Jun 2021, at 06:26, Aditya Mahajan wrote:
>>>
>>> On Mon, 21 Jun 2021, Jeong Dal wrote:
>>>
>>>>
>>>> Hi,
>>>>
>>>> I defined a macro definition in metafun, and draw figures using
>>>
2021, Jeong Dal wrote:
> >
> >>
> >> Hi,
> >>
> >> I defined a macro definition in metafun, and draw figures using
> >> \startbuffer[] … \stopbuffer and \processMPbuffer[].
> >> As you see in the attached code, the same macro definitio
ing
>> \startbuffer[] … \stopbuffer and \processMPbuffer[].
>> As you see in the attached code, the same macro definition is used
>> repeatedly by changing the numeric argument.
>> Is there a better way to simplify the code, for example, using \dorecurse
>> and recurse
On Mon, 21 Jun 2021, Jeong Dal wrote:
>
> Hi,
>
> I defined a macro definition in metafun, and draw figures using
> \startbuffer[] … \stopbuffer and \processMPbuffer[].
> As you see in the attached code, the same macro definition is used repeatedly
> by changing
Hi,
I defined a macro definition in metafun, and draw figures using \startbuffer[]
… \stopbuffer and \processMPbuffer[].
As you see in the attached code, the same macro definition is used repeatedly
by changing the numeric argument.
Is there a better way to simplify the code, for example
\startbuffer[test]
label(textext("$\{a,b\}$"),origin);
\stopbuffer
\starttext
Let $A = \{a,b\}$.
\processMPbuffer[test]
\stoptext
Thanks.
Best regards,
Dalyoung___
If your question is of interest to othe
LMTX fmt: 2021.3.14 int: english/english
\startbuffer[test]
label(textext("$\{a,b\}$"),origin);
\stopbuffer
\starttext
Let $A = \{a,b\}$.
\processMPbuffer[test]
\stoptext
\$ \_ \& \{ \}
become letters when we flush a mp graphic, so use
\lbrace \
}{\stopeffect\blank[5cm]}}
%\enablemode[hideSolution]
\starttext
\framed[]{This is what I want:}
\framedtext[]{
\StartHide
\samplefile{knuth}
Overbar is not \overbar{hidden}.
{\processMPbuffer[circles]}
\StopHide
}
\stoptext
In your case it's easier than you mightt think:
\framedtext[empty=yes
[hideSolution]
\starttext
\framed[]{This is what I want:}
\framedtext[]{
\StartHide
\samplefile{knuth}
Overbar is not \overbar{hidden}.
{\processMPbuffer[circles]}
\StopHide
}
\stoptext
___
If your
ometxt{lengte}, (0.5u,-0.4u)) ;}> > %\doifmode{en}{label(\sometxt{width}, (1.6u, 0.5u)) ;}> > %\doifmode{nl}{label(\sometxt{breedte}, (1.6u, 0.5u)) ;}> > \stopbuffer> > \placefigure> > [here,none][]{}> > {\scale[width=0.5\textwidth]{\processMPb
, 0.5u)) ;}
%\doifmode{nl}{label(\sometxt{breedte}, (1.6u, 0.5u)) ;}
\stopbuffer
\placefigure
[here,none][]{}
{\scale[width=0.5\textwidth]{\processMPbuffer[square]}}
\stoptext
You need to compensate these solutions by "wikifying" them:
\starttext
\startuseMPgraphic{w
\placefigure [here,none][]{} {\scale[width=0.5\textwidth]{\processMPbuffer[square]}} \stoptext
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context
cimal tt & "$"),now);
endfor;
endfor;
\stopbuffer
\startluacode
P={}
combi = P
function P.fact (n)
if n <= 0 then
return 1
else
return n * P.fact(n-1)
end
end
function P.ncr(n,r)
return P.fact(n)/(P.fact(r)*P.fact
path p, q ; pair A, B, start, now;
>u := 1.8cm;
>A := dir(210)*u;
>B := dir(-30)*u;
>dy := sind(30)*u;
>dx := 2*cosd(30)*u;
>for n = 0 upto 4:
>start := n*dir(210)*u;
>for r = 0 upto n:
>s := n - r;
> now := start + r*r
p; "} = "& decimal tt & "$"),now);
dotlabel.top(textext("$\displaystyle {" & decimal n &
"\choose" & decimal r &
uot; & decimal r &
> ")*fact(" & decimal s &" )))");
> tt := lua("mp.print(combi(" & decimal n & "," & decimal r & " ))");
>
> now := start+r*right*dx;
> dotlabel.top(textext("$
xt("$\displaystyle {" & decimal n & "\choose" & decimal
r & "} = "& decimal tt & "$"),now);
draw now -- (now+A);
draw now -- (now+B);
endfor;
endfor;
\stopbuffer
\starttext
\switchtobodyfont[11pt]
\processMPbuffer[fig121]
\switcht
arkblue)
> withpen pencircle scaled 2pt ;
> \stopbuffer
>
> \starttext
>
> This is some text.\margintext{This is a remark in the margin.}
> This is some more text.\margintext{This text is also in the margin.}
> \startplacefigure[location=outerm
ome text.\margintext{This is a remark in the margin.}
This is some more text.\margintext{This text is also in the margin.}
\startplacefigure[location=outermargin,number=no]
\scale[width=\rightmarginwidth]{\processMPbuffer[sine]}
\stopplacefigure
\stoptext
% end
ome text.\margintext{This is a remark in the margin.}
This is some more text.\margintext{This text is also in the margin.}
\startplacefigure[location=outermargin,number=no]
\scale[width=\rightmarginwidth]{\processMPbuffer[sine]}
\stopplacefigure
\stoptext
% end
tartbuffer[3x3b]
wu := \MPvar{width};
drawGridF (3) (1,2,3,0,1, 1,4,5,8);
\stopbuffer
\starttext
\setupMPvariables[width=30pt]
\processMPbuffer[defs,3x3b]
\stoptext
\startbuffer[defs]
def drawGridF (expr nb) (text s) =
path p ;
picture pic ;
numeric n;
p := unitsquare scaled wu;
n:= 0;
f
div nb;
>> pic := image (draw p; label(textext(m), center p); );
>> draw pic shifted (i*wu, j*wu);
>> n:= n+ 1;
>> endfor;
>> enddef;
>> \stopbuffer
>> \startbuffer[3x3b]
>> wu := \MPvar{width}
);
n:= n+ 1;
endfor;
enddef;
\stopbuffer
\startbuffer[3x3b]
wu := \MPvar{width};
drawGridF (3) (1,2,3,0,1, 1,4,5,8);
\stopbuffer
\starttext
\setupMPvariables[width=30pt]
\processMPbuffer[defs,3x3b]
\stoptext
\startbuffer[defs]
def drawGridF (expr nb) (text s) =
path p
;
enddef;
\stopbuffer
\startbuffer[3x3b]
wu := \MPvar{width};
drawGridF (3) (1,2,3,0,1, 1,4,5,8);
\stopbuffer
\starttext
\setupMPvariables[width=30pt]
\processMPbuffer[defs,3x3b]
\stoptext
> 2019. 1. 14. 오후 8:00, ntg-context-requ...@ntg.nl 작성:
>
> Send ntg-context mailing list su
ang]
picture first ; first := outlinetext.p("왕") ; first := first scaled
10 ;
filloutlinetext(first ) withcolor .5[blue,white] ;
drawoutlinetext(first ) ;
\stopbuffer
\starttext
\processMPbuffer[ho]
\processMPbuffer[ha]
tex $\delta$ etex, (3cm,0));
Why not just
label.bot("$\delta$", (3cm,0));
> label.bot(btex $\frac{2-\delta}{2}$ etex, (5cm,0)); %
> \stopbuffer
> \starttext
> \processMPbuffer[delta]
> \stoptext
>
> Best regards,
>
> Dalyoung
> _
)); %
\stopbuffer
\starttext
\processMPbuffer[delta]
\stoptext
Best regards,
Dalyoung
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl
) =
numeric size; size := m*u;
for i = 0 upto (n*n-1):
z[i] = ((i mod n),(floor(i/n)))*size;
drawdot z[i] withpen pencircle scaled 5pt withcolor blue;
endfor;
enddef;
fap(2,2);
fap(3,2);
\stopbuffer
\starttext
\processMPbuffer[test]
\stoptext
;
enddef;
fap(2,2);
fap(3,2);
\stopbuffer
\starttext
\processMPbuffer[test]
\stoptext
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http
%\placefigure[right][]{}{\processMPbuffer[circleA]}
This is a test for placing a figure in the theorem or in the proof.
\tex{placefigure[right][]{}{\processMPbuffer[circleA]}}
insert a blank line at the beginning of the paragraph while there is no blank
line without a figure.
%\placefigure[right
(56);
> picture q;
> path p;
> interim ahlength := 12bp;
> interim ahangle := 25;
> q := glyph “E" of "ec-lmr10" scaled .2;
> %draw q;
> for item within q:
> p := pathpart item;
> draw p withcolor
th := 12bp;
interim ahangle := 25;
q := glyph “E" of "ec-lmr10" scaled .2;
%draw q;
for item within q:
p := pathpart item;
draw p withcolor (.6,.9,.6)
withpen pencircle scaled 1.5;
endfor
\stopbuffer
\starttext
\processMP
q := glyph “E" of "ec-lmr10" scaled .2;
%draw q;
for item within q:
p := pathpart item;
draw p withcolor (.6,.9,.6)
withpen pencircle scaled 1.5;
endfor
\stopbuffer
\starttext
\processMP
make it happen using the following code.
\startbuffer[outline]
%fontmapfile "=lm-ec.map";
picture q;
path p;
interim ahlength := 12bp;
interim ahangle := 25;
q := glyph 100 of "ArialMT"; %nfont defaultfont scaled defaultscale;
draw q;
\stopbuffer
\starttext
\pro
list members,
>>
>> I create all my MetaFun drawings in a separate environment file where each
>> individual drawing sits inside a start/stopbuffer. This allows me to easily
>> use those drawings in all my documents using \processMPbuffer[name]. Works
>> just fine
using
\processMPbuffer[name]. Works just fine.
However, I also wish to have all the drawing available in a pdf file
(each drawing on a separate page). This allows me to split the pdf and
use the drawing elsewhere (e.g. in a Powerpoint) or include page(s)
from the pdf in another document.
The
Dear list members,
I create all my MetaFun drawings in a separate environment file where each
individual drawing sits inside a start/stopbuffer. This allows me to easily use
those drawings in all my documents using \processMPbuffer[name]. Works just
fine.
However, I also wish to have all
\startanimation
{ \dorecurse{5}{%
\setupMPvariables[Circles][s=\recurselevel]
\processMPbuffer [Circles]
}}
\stopanimation
\stoptext
It seems to me that \startanimation just treat the figures
{\dorecurse … } as just one figure.
Is there a way to treat it 5 figures to generate animation?
Thank
;
draw fullcircle scaled \MPrawvar{Circles}{s}u;
\stopbuffer
\starttext
\startanimation
{ \dorecurse{5}{%
\setupMPvariables[Circles][s=\recurselevel]
\processMPbuffer [Circles]
}}
\stopanimation
\stoptext
It seems to me that \startanimation just treat the figures
{\dorecurse … } as just
Dear Wolfgang,
Thank you for your solution.
Sometimes I need to use \processMPbuffer for the animated graphics.
BTW, what is the differences between ‘MPrawvar’ and ‘MPvar’.
MPvar didn’t work in your example.
Best regards,
Dalyoung
Am 22.04.2014 um 14:42 schrieb Jeong Dal hak...@me.com:
Dear Wolfgang,
Thank you for your solution.
Sometimes I need to use \processMPbuffer for the animated graphics.
BTW, what is the differences between ‘MPrawvar’ and ‘MPvar’.
MPvar didn’t work in your example.
The \Mprawvar command
}[origin,3u*dir(30*i)]) ;
endfor;
\stopuseMPgraphic
\starttext
\placefigure[][]{}
{\useMPgraphic{ColoringFace::Labeling}{s=0.8, t=1.3}}
\stoptext
Is there a way to the same job for \processMPbuffer instead of .5 and .7 in
buffer?
\startbuffer[Labels]%{s, t}
numeric u; u:= 1cm;
for i=0
*dir(30*i)])
;
label (textext($v_{ decimal (i) }$ ), \MPvar{t}[origin,3u*dir(30*i)])
;
endfor;
\stopuseMPgraphic
\starttext
\placefigure[][]{}
{\useMPgraphic{ColoringFace::Labeling}{s=0.8, t=1.3}}
\stoptext
Is there a way to the same job for \processMPbuffer instead
by testfig.mp
Any particular reason that you are compiling metapost files using mp and
then including them in ConTeXt rather than directly using any one of the
inbuilt ConTeXt environments for handling mp (\startMPcode, \useMPgraphic,
\processMPbuffer, etc.)
beginfig(1)
label(btex $\Omega$ etex, (0,0
of the
inbuilt ConTeXt environments for handling mp (\startMPcode, \useMPgraphic,
\processMPbuffer, etc.)
Mostly conservatism. I cannot quite figure out the canonical
replacement for btex ... etex (textext, sometext?), and then I get
confused by the many possible environments.
What do you
in ConTeXt rather than directly using any one of the
inbuilt ConTeXt environments for handling mp (\startMPcode, \useMPgraphic,
\processMPbuffer, etc.)
Mostly conservatism. I cannot quite figure out the canonical
replacement for btex ... etex (textext, sometext?), and then I get
confused by the many
withcolor blue;
\stopbuffer
\define
\polyreg
{\processMPbuffer[largeurdeslignes,polygoneregulier,cercleunite]}
\starttext
\polyreg
\stoptext
Thanks, Roland Thiers
___
If your question is of interest to others as well
to to the job, but
it's TeX, not MetaPost. What comes to mind is a \processMPbuffer before
every MPgraphic:
\startbuffer[foo]
size := \somesize ;
\stopbuffer
\startuseMPgraphic{alpha}
fill unitcircle scaled size;
\stopuseMPgraphic
\starttext
\def\somesize{1cm}
\processMPbuffer[foo
. The setups key from \defineMPinstance seems to to the job, but
it's TeX, not MetaPost. What comes to mind is a \processMPbuffer before
every MPgraphic:
\startbuffer[foo]
size := \somesize ;
\stopbuffer
\startuseMPgraphic{alpha}
fill unitcircle scaled size;
\stopuseMPgraphic
\starttext
;
\stopbuffer
\startlines
Only draw T: \processMPbuffer[initialize,T]
Only draw Q: \processMPbuffer[initialize,Q]
Draw T Q : \processMPbuffer[initialize,T,Q]
Draw Q T : \processMPbuffer[initialize,Q,T]
\stoplines
Aditya
:= textext(Hello);
picture Q;
Q := T;
\stopbuffer
\startbuffer[T]
draw T withcolor blue;
\stopbuffer
\startbuffer[Q]
draw Q shifted (-1mm, 1mm) withcolor red;
\stopbuffer
\startlines
Only draw T: \processMPbuffer[initialize,T]
Only draw Q: \processMPbuffer[initialize,Q]
Draw T Q
Dear Wolfgang,
Thank you for the explanation, and your sample works nicely.
I enclosed \processMPbuffer using \startframe and \stopframe as following.
Then I got a 'undefined control sequence' error.
If I use '\framed[]' instead of '\startframe … \stopframe', then it gave all 7
circles
Am 01.01.2013 um 04:50 schrieb Jeong Dal hak...@me.com:
Dear Wolfgang,
Thank you for the explanation, and your sample works nicely.
I enclosed \processMPbuffer using \startframe and \stopframe as following.
Then I got a 'undefined control sequence' error.
If I use '\framed[]' instead
[menu=yes]
{\processMPbuffer[base, fig1]}
{\processMPbuffer[base, fig2]}
{\processMPbuffer[base, fig3]}
\stopanimation
\stoptext
%
I also tried to simplify the code as following, but it just draw 10 figures not
an animation.
Is there a way to combine them as an animation?
Thank you
fullsquare rotated 45 scaled 2cm withcolor blue;
\stopreusableMPgraphic
\startbuffer [third]
fill fullsquare scaled 1cm withcolor green;
\stopbuffer
\starttext
\useMPgraphic{first}
\reuseMPgraphic{second}
\processMPbuffer [third]
\MPframed{second}
\stoptext
Thank you! I'll have
not
always want them, but that \framed{\getbuffer} construction is
downright ugly.
(Untested code, but this should work)
\startbuffer[figure 1]
draw fullcircle scaled 1cm;
\stopbuffer
\startbuffer[frame]
draw (bbox currentpicture) withcolor blue;
\stopbuffer
\processMPbuffer[figure 1, frame
rotated 45 scaled 2cm withcolor blue;
\stopreusableMPgraphic
\startbuffer [third]
fill fullsquare scaled 1cm withcolor green;
\stopbuffer
\starttext
\useMPgraphic{first}
\reuseMPgraphic{second}
\processMPbuffer [third]
\MPframed{second}
\stoptext
Marco
On 14-11-2011 08:23, Jeong Dalyoung wrote:
\startbuffer[test]
draw fullcircle scaled 3cm;
\stopbuffer
\starttext
\placefigure[][]{}
\processMPbuffer[test]
\stoptext
currentpicture := currentpicture xsized(TextWidth) ;
or
\placefigure[][]{}{\scale[width=\textwidth]{\processMPbuffer[test
Dear all,
I use MetaFun to create a figure and embed it using \processMPbuffer[].
for example,
\startbuffer[test]
draw fullcircle scaled 3cm;
\stopbuffer
\starttext
\placefigure[][]{}
\processMPbuffer[test]
\stoptext
But sometimes, I need to rescaling the mp figure to fit the page
I am afraid I don't completely understand this. Doing:
\startbuffer[fig-1]
\startMPcode
draw origin-(20,0) .. origin+(0,20) .. origin+(20,0) .. origin+(0,-20) .. cycle
withcolor darkgreen;
label(textext(Test),origin);
\stopMPcode
\stopbuffer
\starttext
\processMPbuffer[fig-1]
\stoptext
I get
\stopbuffer
\starttext
\processMPbuffer[fig-1]
\stoptext
This works:
\startbuffer[fig-1]
draw (-20,0) .. (0,20) .. (20,0) .. (0,-20) .. cycle withcolor
\MPcolor{darkgreen};
label(textext(Test),origin);
\stopbuffer
\starttext
\processMPbuffer[fig-1]
\stoptext
Wolfgang
. van der:
I am afraid I don't completely understand this. Doing:
\startbuffer[fig-1]
\startMPcode
draw origin-(20,0) .. origin+(0,20) .. origin+(20,0) .. origin+(0,-20) ..
cycle withcolor darkgreen;
label(textext(Test),origin);
\stopMPcode
\stopbuffer
\starttext
\processMPbuffer[fig-1
and in the main file
\environment figures
\starttext
\processMPbuffer[fig-1]
\stoptext
This way you can also combine multiple figures using
\processMPbuffer[fig-common,fig-1]
etc.
The metapost processing is fast enough that there is no noticable speed
difference.
Aditya
);
dominoV (3, 3, 3, 0);
currentpicture := finalpicture;
\stopbuffer
\starttext
\processMPbuffer[dominos]
\stoptext
Thank you again.
Best regards,
Dalyoung
On 2011. 6. 23., at 오후 4:41, Hans Hagen wrote:
On 23-6-2011 6:32, Jeong Dalyoung wrote:
Hi all,
I got the reason why the pictures
\starttext
\processMPbuffer[dominos]
\stoptext
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74
and \processMPbuffer[].
it draw the first domino at the right place, but it is rotated when the second
domino is drawn. Hence, it actually rotated 180 degree. Also two dominos
rotated again when the third domino is drawn.
Previous drawings are rotated again again when the function domino called.
How
;
draw something 2;
pic := currentpicture;
draw pic rotated 90 shifted ( c, d );
enddef;
and call it using
\startbuffer[domino3]
domino (1, 2, 3, 4);
domino (2, 1, 1, 2);
domino (3, 3, 2, 3);
\stopbuffer
and \processMPbuffer[].
it draw the first domino
\setupinteraction[state=start]
\startbuffer[a]
draw fullcircle scaled 1cm;
\stopbuffer
\startbuffer[b]
draw fullcircle scaled 2cm;
\stopbuffer
\startbuffer[c]
draw fullcircle scaled 3cm;
\stopbuffer
\definesymbol[step1][{\processMPbuffer[a]}]
\definesymbol[step2][{\processMPbuffer[a,b
:
for j = 1 upto i:
draw p shifted (lastpoint+.32*j*u,.3u);
endfor;
bwidth := .32i*u+.5u;
draw (lastpoint,0) -- (lastpoint +bwidth,0) -- (lastpoint +bwidth,u);
lastpoint := lastpoint+bwidth;
endfor;
enddef;
draw_balls;
\stopbuffer
\starttext
\processMPbuffer[a]
\stoptext
:
draw p shifted (lastpoint+.32*j*u,.3u);
endfor;
bwidth := .32i*u+.5u;
draw (lastpoint,0) -- (lastpoint +bwidth,0) -- (lastpoint +bwidth,u);
lastpoint := lastpoint+bwidth;
endfor;
enddef;
draw_balls;
\stopbuffer
\starttext
\processMPbuffer[a]
\stoptext
works
, i forgot to change this line.
example code is attached for testing...
\stopbuffer
\starttext
\processMPbuffer[a]
\stoptext
works in mkii, but fails in mkiv. i use an outdated version (31.12.2010)
here.
! LuaTeX error main ctx instance:1: attempt to call field 'feedback'
(a nil value
;
drawpoints p;
drawpointlabels p;
\stopbuffer
\placefigure[middle][]{}{\processMPbuffer[point2]}
Then it draw everything well except writing labels inside the circle. How
can I write the labels of the points outside of the circle?
I'd like to draw 9 points randomly on a circle
][-]{}{\processMPbuffer[axes-1]} {}
\stoptext
%% end
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http
On 14 janv. 09, at 08:57, Taco Hoekwater wrote:
Otared Kavian wrote:
Thanks Aditya for your explanation, but I must say that it is not
convincing because with mkiv one of the buffers is processed with
\processMPbuffer, while the other is not… So there must be some
other hidden behaviour
Hi all,
I have a file which contains the lines below: I can typeset it and
obtain a correct result with mkii, but not with mkiv (the second
buffer named axes-1 does not result in a MetaPost graphic when one
says \processMPbuffer[axes-1]).
The file and the resulting PDF can be found
On Wed, 14 Jan 2009, Otared Kavian wrote:
Hi all,
I have a file which contains the lines below: I can typeset it and obtain a
correct result with mkii, but not with mkiv (the second buffer named axes-1
does not result in a MetaPost graphic when one says
\processMPbuffer[axes-1]).
The file
when
one says \processMPbuffer[axes-1]).
The file and the resulting PDF can be found on
http://www.kavian.fr/tex/bug-mkiv
Thanks in advance for any help.
Best regards: OK
I did not run the file, just guessing. In MKIV, by default buffers
are not written to disk, so \processMPbuffer
Otared Kavian wrote:
Thanks Aditya for your explanation, but I must say that it is not
convincing because with mkiv one of the buffers is processed with
\processMPbuffer, while the other is not… So there must be some other
hidden behaviour which has changed between mkii and mkiv.
I
.
you dont have to type the same code in each mp figure.
see sec 3.4 of the metafun manual, you can processMPbuffer.
Thank you again.
Best regards,
Dalyoung
___
If your question is of interest to others
the length of code which is
less important.
you dont have to type the same code in each mp figure.
see sec 3.4 of the metafun manual, you can processMPbuffer.
also, \includeMPgraphic discussed in sec 3.7
Thank you again.
Best regards,
Dalyoung
Hi Hans and Taco,
The latest beta solves the problems metioned by Thomas Schmitz and
myself concerning \uniqueMPgraphic: many thanks for your attention.
However, I observed the following regarding \processMPbuffer: some
grahpics don't show up when tyepset with mkiv, while they are fine
(and even tried c:
\Program Files\ghostgum\gsview\gsview32.exe), but neither worked.
Any suggestions how I can get the go command to work?
Secondly, what would I do to compile a metapost file in scite
directly into PDF? I am aware of context way with processMPbuffer and
other assorted tricks, and I
[optional format][name][optional settings]
which i somehow dislike
3. What about \startMPcode, \startMPpage, and \processMPbuffer? I think
that the first approach will be easier to adapt.
another option is:
\useMPformat{metafun}
(the reason for { }instead of [] is that it then can be used within
.
\startuseMPgraphic[metafun]{...} is also an option but not consistent,
unless we provide
\startuseMPgraphic[optional format][name][optional settings]
which i somehow dislike
3. What about \startMPcode, \startMPpage, and \processMPbuffer? I think
that the first approach will be easier to adapt
, then
maybe something like
\startuseMPgraphic{::metafun::bla} so that it does not break existing
code.
3. What about \startMPcode, \startMPpage, and \processMPbuffer? I think
that the first approach will be easier to adapt.
Aditya
)) ;
\stopbuffer
\processMPbuffer[test]
\blank[big]
\startMPinitializations
test := false ;
\stopMPinitializations
\processMPbuffer[test]
Too bad context cannnot parse metapost syntax :)
Workaround (ugly)
Another workaround, slightly less ugly (as long as you count the
number
Hi,
Found an interesting sometxt misfeature.
\startMPinclusions
boolean test ; test=true ;
\stopMPinclusions
\startbuffer[test]
if test :
label(\sometxt{True}, origin) ;
fi ;
label(\sometxt{False}, (10,10)) ;
\stopbuffer
\processMPbuffer[test]
\blank[big
\processMPbuffer[test]
\blank[big]
\startMPinitializations
test := false ;
\stopMPinitializations
\processMPbuffer[test]
Too bad context cannnot parse metapost syntax :)
Workaround (ugly)
Another workaround, slightly less ugly (as long as you count the
number of \sometxt in the if part
anything when I switch to
buffer and use \processMPbuffer.
On 6/10/07, Mojca Miklavec [EMAIL PROTECTED] wrote:
On 6/6/07, Zhichu Chen wrote:
Hi
I've tried to write a test file which can only handle ;B[??], ;W[??],
AB[??], AW[??] now, and I haven't added the interaction part
1 - 100 of 114 matches
Mail list logo